package labox.innovation.gameserver.skills.effects;

import labox.innovation.gameserver.model.L2Effect;
import labox.innovation.gameserver.model.actor.instance.FuzePcInstance;
import labox.innovation.gameserver.skills.Env;
import labox.innovation.gameserver.templates.effects.EffectTemplate;
import labox.innovation.gameserver.templates.skills.L2EffectType;

public class EffectDisableAttackByPc extends L2Effect {

	public EffectDisableAttackByPc(Env env, EffectTemplate template) {
		super(env, template);
		// TODO Auto-generated constructor stub
	}
	
	public boolean onStart(){
		
		if( getEffected() instanceof FuzePcInstance ){
			
			( (FuzePcInstance)getEffected() ).setAttackByPc( false );
			
			super.onStart();
			
			return true;
			
		}
		
		return false;
		
	}
	
	public void onExit() {
		( (FuzePcInstance)getEffected() ).setAttackByPc( true );
		super.onExit();
	}
	
	
	public boolean onActionTime() {
		return false;
	}

	@Override
	public L2EffectType getEffectType() {
		// TODO Auto-generated method stub
		return L2EffectType.BUFF;
	}

}
